arm64: Refactor mov/movprfx for unmasked operations#123717
arm64: Refactor mov/movprfx for unmasked operations#123717ylpoonlg wants to merge 8 commits intodotnet:mainfrom
Conversation
* Move MOVPRFX logic from codegen to emit.
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
|
SPMI asmdiffs: G_M39772_IG02: ; bbWeight=1, gcrefRegs=0000 {}, byrefRegs=0000 {}, byref
ldr q16, [fp, #0x20] // [V00 arg0]
ldr w0, [fp, #0x1C] // [V01 arg1]
- mov v0.16b, v16.16b
+ movprfx z0, z16
insr z0.s, w0
- ;; size=16 bbWeight=1 PerfScore 8.50
+ ;; size=16 bbWeight=1 PerfScore 10.00ASIMD |
In an ideal world, the perfscore would detect instruction fusing (but let's not try to fix that here - perfscore needs fixing regardless). So, agreed, your patch is better. |
|
@dhartglassMSFT, PTAL. |
|
Hi @ylpoonlg I added a blurb in the PR description, I didn't find the description clear in 115508. Thanks Alan for filling me in on that. Hopefully will help out anyone looking in this area in the future. Please feel free to re-word it too, if you dont like the wording or if I got a detail wrong. |
|
Change lgtm, thanks for the refactor I can merge once Alan signs off. |
Head branch was pushed to by a user without write access
|
linux arm64 + linux x64 failures are Test System.Net.Quic.Tests.MsQuicPlatformDetectionTests.* stuff we've seen this week OSX arm64 is undefined symbols we've seen this week |
This PR is the first of a few contributing to #115508.
Motivation was that the jit doesn't recognize read-modify-write instructions (
Addwith two operands for example) until later after lsra. Jit needs to prefix such instructions withmov/movprfxwhere it can't encode the dst operand. Previously, this logic was sprinkled around code-generation. This PR moves this logic to create thesemovs in a unified location, during emithwintrinsiccodegenarm64.cpp.AddCarryWideningEven/Oddinto the emit function.cc @dotnet/arm64-contrib @a74nh